<!--
 * @Author: your name
 * @Date: 2021-09-16 10:02:57
 * @LastEditTime: 2021-09-16 10:12:36
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\6-jQuery\day05\6-Cookies.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cookies</title>
    <!-- 引入第三方库的cookies -->
    <script src="https://cdn.bootcdn.net/ajax/libs/js-cookie/latest/js.cookie.js"></script>
    <script>
        //console.log(Cookies);
        //设置内容 set(key,value,attributes) 第三个参数是配置对象 设置cookies到期期限
        Cookies.set("age", 12, {
                expires: 7
            })
            //获取内容
        console.log(Cookies.get("age"));
        //清空设置内容
        //console.log(Cookies.remove("name"));
    </script>
</head>

<body>

</body>

</html>